//自定义顶部菜单
let electron=require('electron');
let Menu=electron.Menu;
let template=[
    {
        label:'文件',
        submenu:[
            {
                label:'新建文件',
                accelerator:'ctrl+n',
                click(){
                    
                }
            },
            {
                label:'新建窗口'
            }
        ]
    },
    {
        label:'编辑',
        submenu:[
            {
                label:'复制',
                role:'copy'
            },
            {
                label:'剪切',
                role:'cut'
            }
        ]
    }
]
let m=Menu.buildFromTemplate(template)
Menu.setApplicationMenu(m) 